﻿<UserControl 
    xmlns:controlsToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ctrls="clr-namespace:SUMO.MediaBrowser.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:expressionDark="clr-namespace:System.Windows.Controls.Theming;assembly=System.Windows.Controls.Theming.ExpressionDark" 
    x:Class="SUMO.MediaBrowser.Controls.MediaImageList"
    >
   
	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="0"/>
            <RowDefinition/>
		</Grid.RowDefinitions>
        
		<ListBox SelectionChanged="MediaList_SelectionChanged" Grid.Row="2" x:Name="MediaList" Margin="0" BorderThickness="0" BorderBrush="#FFB6B8BA">
			<ListBox.ItemsPanel>
				<ItemsPanelTemplate>
					<controlsToolkit:WrapPanel/>        
				</ItemsPanelTemplate>
			</ListBox.ItemsPanel>
            
			<ListBox.Template>
				<ControlTemplate>
					<Grid>
						<ScrollViewer BorderThickness="0,1,0,0" BorderBrush="#FFB6B8BA">
							<ItemsPresenter />
						</ScrollViewer>
					</Grid>
				</ControlTemplate>
			</ListBox.Template>
            
			<ListBox.ItemTemplate>
				<DataTemplate>
					<StackPanel>
						<ctrls:ImageMediaItemThumbnail DataContext="{Binding}"/>
					</StackPanel>
				</DataTemplate>
			</ListBox.ItemTemplate>
            
		</ListBox>
    
	</Grid>
   
</UserControl>
